<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
    <script type="text/javascript">
        var str1 = "this is a test";
        var arr = str1.split(" ");
        var str2 = arr.join(",");
        with(document){
            write(str1);
            write("<br>分割为数组，数组长度" + arr.length + ",重新连接如下：<br>");
            write(str2);
        }
    </script>
</head>
<body>

</body>
</html>